package Interaction;

public class Agent 
{
	private boolean move_, playedThisRound_;
	private int ID_, fitness_, playedTotal_;
	
	Agent(int ID, boolean move)
	{
		ID_ = ID;
		move_ = move;
		fitness_ = 0;
	}
	void setMove(boolean move){
		move_ = move;
	}
	boolean getMove(){
		return move_;
	}
	void setPayoff(int payoff){
		fitness_ = payoff;
	}
	int getPayoff(){
		return fitness_;
	}
	void setPlayedThisRound(boolean PTR){
		playedThisRound_ = PTR;
	}
	boolean getPlayedThisRound(){
		return playedThisRound_;
	}
	void setPlayedTotal(boolean PT){
		if(PT)
			playedTotal_++;
		else
			playedTotal_--;
	}
	int getPlayedTotal(){
		return playedTotal_;
	}
	void printSingle(){
		String tempMove;
		if(move_)
			tempMove = "Cooperative";
		else
			tempMove = "Defect";
		
		System.out.print("The fitness of the object Agent" + ID_ + " (" + tempMove + ") is: " + fitness_ + ", after " + playedTotal_ + " played rounds.\n");
	}
	
}
